import ApiBase from './ApiBase'

export default class DataSetService extends ApiBase {
    //获取子数据集列表
    async getList(params) {
        let data = params ? params:{};
        const result = await super.request('/sub_data_set/list',data);
        return result;
    }
    
    async getAll(params) {
        let data = params ? params : {};
        const result = await super.request('/sub_data_set/all', data);
        return result;
    }

    //添加子数据集
    async add( subSetName, dataSetId ) {
        const result = await super.request('/sub_data_set/add', { sub_set_name: subSetName, data_set_id: dataSetId})
        return result
    }

    //根据数据子集和geo层获取正式gis数据
    async realMap(params) {
        let data = params ? params:{};
        const result = await super.request('/task/get_real',data)
        return result
    }

    //删除
    async dele( id ) {
        const result = await super.request('/sub_data_set/delete', {sub_set_id: id})
        return result
    }
}